import { View, AppEvent, ViewSettings } from "../../framework/framework";

class IndexView extends View implements IView {

  constructor(metiator: IMediator) {
    super(metiator);
  }

  public initialize(): void {
    this.subscribeToEvents([
      new AppEvent("app.view.index.index", null, (e, model: any) => { this.index() })
    ]);
  }
  public dispose() {
    this.unsubscribeToEvents();
  }
  public index() {
    this.triggerEvent(new AppEvent("app.sendjson", JSON.stringify({ "name": "zhang" }), null));
  }
}

export { IndexView };
